﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Workbench.Models
{
    public class ExerciseSuiteModel : PersistableModel, IEquatable<ExerciseSuiteModel>
    {
        public ExerciseSuiteModel() : this(null)
        {
            
        }

        public ExerciseSuiteModel(string name)
        {
            this.Name = name;
            Exercises = new List<ConcordancerExerciseModel>();
        }

        public string Name { get; set; }

        public List<ConcordancerExerciseModel> Exercises { get; set; }

        public bool Equals(ExerciseSuiteModel other)
        {
            return RowId == other.RowId;
        }

        public override int GetHashCode()
        {
            return RowId.GetHashCode();
        }
    }

    public class ConcordancerExerciseModel : PersistableModel
    {
        public ConcordancerExerciseModel()
        {
            SentenceIds = new List<long>();
        }

        public ConcordancerExerciseModel(string name, List<long> sentenceIds, WordSuggestionModel word)
        {
            this.SentenceIds = sentenceIds;
            this.Word = word;
            this.Name = name;
        }

        public string Name { get; set; }

        public List<long> SentenceIds { get; set; }

        public WordSuggestionModel Word { get; set; }
    }
}
